<!--购物车-->
<div class="zezao"></div>
<style>
    .zezao{position:fixed;top:0;bottom:0;width:100%;background:rgba(0,0,0,0.5);display:none;z-index:1;}
</style>
<div class="shopcarbox">
    <div class="left" >
        <div class="imgbox"  id="shopcarbtn">
            <?php if (empty($cart['list'])):?>
                <img src="<?php echo $this->staticUrl?>img/png/pic85.png" alt="">
            <?php else:?>
                <img src="<?php echo $this->staticUrl?>img/png/pic86.png" alt="">
                <span class="weui-badge" style="position: absolute;top: 0;right: -2px;"><?php echo $cart['number']?></span>
            <?php endif;?>
        </div>
        <input type="hidden" value="<?php echo $cart['total']?>" id="total">
        <div class="p5_0 total">
            <?php if (!empty($cart['list'])):?>
                <p class="f10 cor9 lh10 mbmin mt5"><span class="mr5">共</span>¥<?php echo $cart['total']?></p>
                <!--                            <p class="f07 cor9 lh10">另需付配送费10元</p>-->
            <?php else:?>
                <p class="f07 cor9 lh10 mt5">购物车是空的</p>
            <?php endif;?>
        </div>
    </div>
    <?php if ($submit):?>
        <input type="hidden" value="<?php echo $info['min_consume']?>" id="minConsume">
        <input type="hidden" value="<?php echo $info['business']?>" id="business">

            <?php if ($cart['total'] > 0 && $info['min_consume'] <= $cart['total']):?>
                <div class="right submit" >
                    <span>去结算</span>
                </div>

            <?php else:?>
            <div class="right submit" style="background: #999">
                <span>￥</span>
                <span><?php echo $info['min_consume']?>起送</span>
            </div>
            <?php endif;?>

    <?php else:?>
        <div class="right zj " data-id="<?php echo $tA['id']?>">
            <span <?php if (empty($tA['property'])):?> class="add" <?php else:?> class="guige" <?php endif;?>>加入购物车</span>
        </div>
    <?php endif;?>
    
</div>
<div class="shopcar" <?php if (empty($cart['list'])):?> style="display: none" <?php endif;?> >
        <div class="title vCenter heng"><h1 class="f09">购物车</h1>
            <div href="<?php echo getUrl('cart/deleteAll')?>" class="f08 removecar" alert-message="是否确认清空购物车？">
                <img class="heightimg di mbmin mr5" src="<?php echo $this->staticUrl?>img/png/pic93.png" alt="">清空
            </div>
        </div>
        <form action="<?php echo getUrl('product/previewOrder?merchant_id='.$merchantId)?>" id="save-form" method="post">
            <ul>
                <?php foreach ($cart['list'] as $k => $v):?>
                    <li class="heng c">
                        <div class="">
                            <p class="lh10 f09"><?php echo $v['name']?></p>
                            <p class="lh10"><span class="f07 cor9"><?php echo $v['property_str']?>
                                <?php if($v['tags']):?>
                                (<?php echo $v['tags']?>)
                                <?php endif;?>
                                </span></p>
                            <p class="status" style="display:none;"><?php echo $v['status'];?></p>
                        </div>
                        <div class="heng vCenter">
                            <div class="price">
                                <span class="szzz mr10 xian">¥ <?php echo $v['price']?></span>
                            </div>
                            <div class="zengjian zj" data-id="<?php echo $v['id']?>" data-sort="<?php echo $v['sort']?>">
                                <div class="min"></div>
                                <div class="zi"><?php echo $v['quantity']?></div>
                                <div class="add"></div>
                            </div>
                        </div>
                        <input type="hidden" value="<?php echo $v['id']?>" name="product[<?php echo $k?>][product_id]">
                        <input type="hidden" value="<?php echo $v['sort']?>" name="product[<?php echo $k?>][sort]">
                        <input type="hidden" value="<?php echo $v['tags']?>" name="product[<?php echo $k?>][tags]">
                        <input type="hidden" value="<?php echo $v['quantity']?>" name="product[<?php echo $k?>][quantity]">
                    </li>
                <?php endforeach; if ($cart['lunch_box_fee'] > 0):?>
                    <li class="heng">
                        <div class="">
                            <p class="lh10">打包费</p>
                        </div>
                        <div class="heng vCenter">
                            <span class="hongzi mr10">¥ <?php echo $cart['lunch_box_fee']?></span>
                        </div>
                    </li>
                <?php endif;?>
            </ul>
        </form>
    </div>
